package com.ddz.implementation;

import android.graphics.Bitmap;

import com.ddz.implementation.Graphics.ImageFormat;
import com.ddz.interfaces.IImage;

public class Image implements IImage {
	Bitmap mBitmap;
	ImageFormat mFormat;

	public Image(Bitmap bitmap, ImageFormat format) {
		mBitmap = bitmap;
		mFormat = format;
	}

	@Override
	public int getWidth() {
		return mBitmap.getWidth();
	}

	@Override
	public int getHeight() {
		return mBitmap.getHeight();
	}

	@Override
	public ImageFormat getFormat() {
		return mFormat;
	}

	@Override
	public void dispose() {
		mBitmap.recycle();
	}
}
